<?php

namespace App\Http\Controllers\Home;

use App\Models\Member;
use App\Models\Roomcategroy;
use App\Models\Roomnum;

class CateroomController extends BaseController
{

    public function __construct(Member $member ,Roomcategroy $roomcategroy , Roomnum $roomnum)
    {
        parent::__construct();
        $this->roomcategroy = $roomcategroy;
        $this->room = $roomnum;
        $this->member = $member;
    }



    /**
     * 首页
     */
    public function getIndex(){
         $user = $this->member->userInit();
         $roomcate = $this->roomcategroy->getList();
         $data = $this->room->getRoomdataBycate();
         return view('Home.home.cate',compact('roomcate','data','user'));
    }


}